package demo3;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-11-15
 * Time: 9:38
 */
public class Course extends S{
    String[] className;

    public Course(String name, int[] score,String[] className){
        super(name,score);
        this.className = className;
    }

    //冒泡排序
    public void bubbleSort(int[] arr,String[] className){
        int n = arr.length;
        for(int i = 0;i<n-1;i++){
            for(int j = 0;j < n-i-1;j++){
                if(arr[j]>arr[j+1]){
                    int t = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1 ] = t;

                    String v = className[j];
                    className[j] = className[j+1];
                    className[j+1] = v;
                }
            }
        }
    }
}
